import java.util.Scanner;

public class Main {

    /**
     * JAVA27 重写父类方法
     * @param args
     */
    public static void main1(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNextInt()) {
            int x = scanner.nextInt();
            int y = scanner.nextInt();
            Sub sub = new Sub(x, y);
            System.out.println(sub.sum());
        }
    }

}

class Base {

    private int x;
    private int y;

    public  Base(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int getX() {
        return x;
    }

    public final int getY() {
        return y;
    }

    public final int sum() {
        return getX() + getY();
    }

}

class Sub extends Base {

    public Sub(int x, int y) {
        super(x, y);
      
    }

    //write your code here......
       public int getX() {
        return super.getX()*10;
    }

    /**
     * JAVA28 创建单例对象
     * @param args
     */
    public static void main2(String[] args) {
        Singleton s1 = Singleton.getInstance();
        Singleton s2 = Singleton.getInstance();
        System.out.println(s1 == s2);
    }

}

class Singleton {

    private static Singleton instance;

    private Singleton() {

    }

    //write your code here......

    public static Singleton getInstance(){
        if (instance == null){
            instance = new Singleton();
        }
        return instance;
    }


    /**
     * JAVA29 动态字符串
     * @param args
     */
    public static void main3(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();

        //write your code here......
        StringBuilder ans = new StringBuilder();
        int ct = 0;
        for (int i = str.length()-1;i>=0;i--){
            char ch = str.charAt(i);
            ans.append(ch);
            ct++;
            if (ct % 3 == 0 && i != 0){
                ans.append(",");
            }

        }
        System.out.println(ans.reverse());
    }


    /**
     * JAVA30 统计字符串中字母出现次数
     * @param args
     */
    public static void main4(String[] args) {
        String string = "H e l l o ! n o w c o d e r";
        Scanner scanner= new Scanner(System.in);
        String word = scanner.next();
        scanner.close();
        System.out.println(check(string, word));
    }

    public static int check(String str, String word) {

        //write your code here......
        char[] sour = str.toCharArray();
        char[] ans = word.toCharArray();
        int ct = 0;
        for (int i = 0;i<str.length();i++){
            if (sour[i] == ans[0]){
                ct++;
            }
        }
        return ct;

    }


    /**
     * JAVA31 十进制数转二进制数
     * @param args
     */
    public static void main5(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();

        //write your code here......
        System.out.println(func(num));
    }
    public static int func(int num){
        int count = 0;//位数
        int low = 0;//余数
        int bit = 0;//转换后的二进制
        while(num != 0){
            low = num%2;
            num /= 2;
            bit += low * Math.pow(10,count);
            count++;
        }
        return bit;
    }
}